package com.yzt.message.adapter;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

import io.rong.imkit.conversationlist.ConversationListAdapter;
import io.rong.imkit.conversationlist.model.BaseUiConversation;

/**
 * 消息适配器
 */
public class MessageListAdapter extends ConversationListAdapter {

    @Override
    public void setDataCollection(List<BaseUiConversation> data) {
        if (mDataList == null) {
            mDataList = new CopyOnWriteArrayList<>();
        }
        mDataList.clear();
        mDataList.addAll(data);
        this.notifyDataSetChanged();
    }
}
